<script setup>
import { RouterView } from 'vue-router'
import { onMounted } from 'vue'
import { useRouter } from 'vue-router'
import { wxShare } from '@/utils/wxShare.js'

const router = useRouter()

// 刷新
if (router.path !== '/') {
  router.replace('/')
}

onMounted(() => {
  // initBGM()
  // wxShare({
  //   title: '标题...',
  //   desc: '描述...',
  //   link: '',
  //   imgUrl: ''
  // })
})
</script>

<template>
  <RouterView />
</template>
<style lang="scss">
@font-face {
  font-family:'SourceHanSansCN';
  font-weight: normal;
  src: url('./assets/fonts/SourceHanSansCN-Regular.otf');
}
@font-face {
  font-family:'SourceHanSansCN';
  font-weight: 500;
  src: url('./assets/fonts/SourceHanSansCN-Medium.otf');
}
@font-face {
  font-family:'SourceHanSansCN';
  font-weight: bold;
  src: url('./assets/fonts/SourceHanSansCN-Bold.otf');
}
@font-face {
  font-family: 'YouSheBiaoTiHei';
  src: url('./assets/fonts/YouSheBiaoTiHei-2.ttf') format('truetype');
}
body {
  font-family: 'SourceHanSansCN';
  font-weight: normal;
}
#app {
  position: relative;
  width: 100%;
  height: 100%;
  margin: 0 auto;
  padding: 0;
  font-weight: normal;
  background-color: #1e3398;
  color: #ffffff;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  // user-select: none;
  line-height: 1;
}
// 基础box
.box {
  position: relative;
  width: 100vw;
  height: 100vh;
}
.bg{
  background: url('./assets/img/bg.jpg') no-repeat center center;
  background-size: cover;
}
.clmcenter {
  display: flex;
  flex-flow: column nowrap;
  justify-content: center;
  align-items: center;
}
.clmstart {
  display: flex;
  flex-flow: column nowrap;
  justify-content: flex-start;
  align-items: center;
}
// 按钮动画
.btnani {
  animation: btnanito 2s linear infinite;
}
@keyframes btnanito {
  0% {
    transform: scale(1);
  }
  50% {
    transform: scale(1.05);
  }
  100% {
    transform: scale(1);
  }
}
</style>
